<?php
App::uses('AppModel', 'Model');
/**
 * LogLine Model
 *
 * @property Character $Character
 * @property Item $Item
 * @property Power $Power
 */
class LogLine extends AppModel {
/**
 * Validation rules
 *
 * @var array
 */
	public $validate = array(
		'log_text' => array(
			'notEmpty' => array(
				'rule' => array('notEmpty'),
				'message' => 'Log Lines must contain text, else they\'re useless',
			),
		),
		'deleted' => array(
			'boolean' => array(
				'rule' => array('boolean'),
				'message' => 'You should not be seeing this message. Deleted should be true or false.',
			)
		)
	);

	//The Associations below have been created with all possible keys, those that are not needed can be removed

/**
 * belongsTo associations
 *
 * @var array
 */
	public $belongsTo = array(
		'Character' => array(
			'className' => 'Character',
			'foreignKey' => 'character_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'Item' => array(
			'className' => 'Item',
			'foreignKey' => 'item_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'Power' => array(
			'className' => 'Power',
			'foreignKey' => 'power_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	);
}
